<?php
/**
 * init mongodb
 * 
 * @author      lifeibest@gmail.com   http://www.liifei.com
 * @version 1.0
 */
if (!version_compare(PHP_VERSION, "5.0")) {
	exit("The version must be at least PHP5,please upgrade your php library");
}
if (!class_exists('Mongo')){
	exit("Need mongo extension");
}
define("VERSION", "1.0.0");
session_start();

        set_magic_quotes_runtime(0);
        if (get_magic_quotes_gpc())
        {
            $in = array(& $_GET, & $_POST, & $_COOKIE, & $_REQUEST);
            while (list ($k, $v) = each($in))
            {
                foreach ($v as $key => $val)
                {
                    if (! is_array($val))
                    {
                        $in[$k][$key] = stripslashes($val);
                        continue;
                    }
                    $in[] = & $in[$k][$key];
                }
            }
            unset($in);
        }
    ini_set ( 'display_errors' ,  'On' ); 
    ini_set ( 'error_reporting' ,  1 ); 
       
require_once('config.php');
require_once('libs/phpmongo.php');
require_once('libs/functions.php');
require_once('libs/page.php');

